﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
					xmlns:Controls="clr-namespace:DanielVaughan.Calcium.Gui.Controls" 
					xmlns:Calcium="clr-namespace:DanielVaughan.Calcium" 
					xmlns:TaskModel="clr-namespace:DanielVaughan.Calcium.TaskModel" 					 
					xmlns:Gui="clr-namespace:DanielVaughan.Calcium.Gui" 
					xmlns:Commands="clr-namespace:DanielVaughan.Calcium.Commands" 
                    xmlns:cal="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism">
	
	<Style TargetType="{x:Type Controls:StandardMenu}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Controls:StandardMenu}">
					<Grid x:Name="LayoutRoot">
						<DockPanel>
							<Border x:Name="Border_Menu">
								<Menu cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.MainMenu}">
									<!-- File menu. -->
									<MenuItem Header="File" cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.File}">
										<MenuItem Header="New" cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.FileNew}"/>
										<MenuItem Header="Open" cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.FileOpen}"/>
										<Separator />
										<MenuItem Command="ApplicationCommands.Save" />
										<MenuItem Command="ApplicationCommands.SaveAs" />
										<MenuItem Command="{x:Static Gui:ShellView.SaveAll}" />
										<Separator />
										<MenuItem Command="ApplicationCommands.Close" />
										<Separator />
										<MenuItem Command="{Binding Source={x:Static Commands:ShellCommands.ExitApplicationCommand}}" 
													Header="Exit"/>
									</MenuItem>

									<!-- Edit menu. -->
									<MenuItem Header="Edit" cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.Edit}">
										<MenuItem Command="ApplicationCommands.Undo" />
										<MenuItem Command="ApplicationCommands.Redo" />
										<MenuItem Command="{Binding Source={x:Static TaskModel:TaskCommandProxies.RepeatTaskCommandLogic}, Path=Command}" 
													Header="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" />
										<MenuItem Command="{Binding Source={x:Static TaskModel:TaskCommandProxies.UndoGlobalTaskCommandLogic}, Path=Command}" 
													Header="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" />
										<MenuItem Command="{Binding Source={x:Static TaskModel:TaskCommandProxies.RedoGlobalTaskCommandLogic}, Path=Command}" 
													Header="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" />
										<Separator />
										<MenuItem Command="ApplicationCommands.Cut" />
										<MenuItem Command="ApplicationCommands.Copy" />
										<MenuItem Command="ApplicationCommands.Paste" />
									</MenuItem>

									<!-- View menu. -->
									<MenuItem Header="View" cal:RegionManager.RegionName="{x:Static Calcium:MenuNames.View}">
									</MenuItem>
									
									<!-- Help menu. -->
									<MenuItem Header="Help" Width="Auto" Height="Auto">
										<MenuItem Command="{Binding Source={x:Static Commands:ShellCommands.ShowAboutBoxCommand}}" 
													Header="{Binding RelativeSource={RelativeSource Self}, Path=Command.Text}" />
									</MenuItem>
								</Menu>
							</Border>
						</DockPanel>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
</ResourceDictionary>